1700 |
How do I layout expandable columns
public void init() { COM com_Column,com_Column1,com_Column2,com_Column3,com_Columns; anytype var_Column,var_Column1,var_Column2,var_Column3,var_Columns; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ColumnAutoResize(false); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("C0")); com_Column = var_Column; com_Column.ExpandColumns("1,2"); com_Column.DisplayExpandButton(true); com_Columns.Add("C1"); com_Columns.Add("C2"); com_Columns.Add("C3"); var_Column1 = COM::createFromVariant(com_Columns.Add("C4")); com_Column1 = var_Column1; com_Column1.ExpandColumns("5,6"); com_Column1.DisplayExpandButton(true); com_Columns.Add("C5"); var_Column2 = COM::createFromVariant(com_Columns.Add("C6")); com_Column2 = var_Column2; com_Column2.ExpandColumns("6,7"); com_Column2.DisplayExpandButton(true); com_Columns.Add("C7"); exg2antt1.EndUpdate(); var_Column3 = COM::createFromObject(exg2antt1.Columns()).Item("C4"); com_Column3 = var_Column3; com_Column3.Expanded(false); } |
1699 |
Is it possible to display automatically the start/end margins of the bars
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(3/*exBarCaption*/,"<%=%1%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); com_Bar.Def(44/*exBarExtraCaption*/,"<%=%2%>"); com_Bar.Def(45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(18)); com_Chart.ScrollTo(com_Chart.FirstVisibleDate(),COMVariant::createFromInt(1)); exg2antt1.Columns().Add("Task"); COM::createFromVariant(exg2antt1.Columns().Add("ToolTip")).Visible(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"bar <b>a"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/29/2000",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); h = com_Items.AddItem("Item 2"); com_Items.CellValue(h,COMVariant::createFromInt(1),"bar <b>b"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/30/2000",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1698 |
Is it possible to assign the bar's caption from a hidden column
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(3/*exBarCaption*/,"<%=%C1%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); exg2antt1.Columns().Add("Task"); COM::createFromVariant(exg2antt1.Columns().Add("ToolTip")).Visible(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"bar <b>a"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); h = com_Items.AddItem("Item 2"); com_Items.CellValue(h,COMVariant::createFromInt(1),"bar <b>b"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1697 |
Is it possible to assign the bar's tooltip from a hidden column
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(6/*exBarToolTip*/,"<%=%C1%>"); exg2antt1.Columns().Add("Task"); COM::createFromVariant(exg2antt1.Columns().Add("ToolTip")).Visible(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"This is a bit of text that's shown when the cursor hovers the bar on item 1."); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); h = com_Items.AddItem("Item 2"); com_Items.CellValue(h,COMVariant::createFromInt(1),"This is a bit of text that's shown when the cursor hovers the bar on item 2."); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1696 |
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 2)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Default"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(65536)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1695 |
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 1)
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(51/*exBarFrameColor*/,COMVariant::createFromInt(65536)); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Default"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1694 |
What I need is bars that have a solid color, but with a black frame. How can we do that
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); var_Bar = COM::createFromObject(exg2antt1.Chart().Bars()).Add("Frame"); com_Bar = var_Bar; com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Color(WinApi::RGB2int(0,255,0)); com_Bar.Def(51/*exBarFrameColor*/,COMVariant::createFromInt(65536)); com_Bar.Def(3/*exBarCaption*/,"<font ;6><%=%C0%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar.Height(15); exg2antt1.Columns().Add("Frames"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Default"),"Frame",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); h = com_Items.AddItem("Inside Color"); com_Items.AddBar(h,"Frame",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(255)); h = com_Items.AddItem("Border Color"); com_Items.AddBar(h,"Frame",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33023)); h = com_Items.AddItem("Inside/Border Color"); com_Items.AddBar(h,"Frame",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(16711680)); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33023)); h = com_Items.AddItem("Thick-Border"); com_Items.AddBar(h,"Frame",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",42/*exBarPattern*/,COMVariant::createFromInt(4097)); h = com_Items.AddItem("Thick-Border + Pattern"); com_Items.AddBar(h,"Frame",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",42/*exBarPattern*/,COMVariant::createFromInt(4098)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1693 |
How can we drag bars from one item to the other
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.DrawGridLines(-1/*exAllLines*/); COM::createFromVariant(exg2antt1.Columns().Add("Members")).Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.AllowSelectObjects(0/*exNoSelectObjects*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.DrawGridLines(-1/*exAllLines*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(4611/*exOverlaidBarsIncludeCaption | exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar.Height(18); com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Color(WinApi::RGB2int(0,128,255)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Member <b>1</b>"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/23/2006",213)),"T102","<font ;6><fgcolor FFFFFF>Task <b>102</b>"); com_Items.ItemBar(h,"T102",28/*exBarCanMoveToAnother*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Member <b>2</b>"); h = com_Items.AddItem("Member <b>3</b>"); h = com_Items.AddItem("Member <b>4</b>"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/23/2006",213)),"T103","<font ;6><fgcolor FFFFFF>Task <b>103</b>"); com_Items.ItemBar(h,"T103",28/*exBarCanMoveToAnother*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1692 |
How can I use the exBarBackgroundExt option of the Items.ItemBar property
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(26); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.NonworkingDays(0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Height(22); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Border-Top"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"top[3,back=RGB(0,0,0)]"); h = com_Items.AddItem("Border-Bottom"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"bottom[3,back=RGB(255,0,0)]"); h = com_Items.AddItem("Border-Left"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"left[6,back=RGB(0,255,0)]"); h = com_Items.AddItem("Border-Right"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"right[6,back=RGB(0,0,255)]"); h = com_Items.AddItem("Border-All"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"top[3,back=RGB(0,0,0)],right[3,back=RGB(0,0,255)],bottom[3,back=RGB(255,0,0)],left[3,back=RGB(0,255,0)],client"); h = com_Items.AddItem("Middle"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(25%,25%,50%,50%),back=RGB(255,0,0)]"); h = com_Items.AddItem("Horizontal"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(0,50%-2,100%,4),back=RGB(255,0,0)]"); h = com_Items.AddItem("Vertical"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(50%-2,0,4,100%),back=RGB(255,0,0)]"); h = com_Items.AddItem("Mixt"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"[[patterncolor=RGB(255,0,0)](none[(4,4,100%-8,100%-8),pattern=0x006,patterncolor=RGB(255,0,0),frame=RGB(255,0,0),framethick])]"); h = com_Items.AddItem("Misc"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"bottom[50%,pattern=10,frame]"); h = com_Items.AddItem("Complex"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"left[10%](top[90%,back=RGB(0,0,0)]),top[30%,back=RGB(254,217,102)],client[back=RGB(91,156,212)]"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1691 |
Does the title of the cell's tooltip supports HTML format
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; str var_s; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("")); com_Column = var_Column; com_Column.Caption(""); com_Column.HTMLCaption("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; var_s = "<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the titl"; var_s = var_s + "e centered with a different color."; com_Items.CellToolTip(com_Items.AddItem("tooltip w/h different title"),COMVariant::createFromInt(0),var_s); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1690 |
How do I specify a different title for the cell's tooltip
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("")); com_Column = var_Column; com_Column.Caption("This is the title"); com_Column.HTMLCaption("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellToolTip(com_Items.AddItem("tooltip w/h different title"),COMVariant::createFromInt(0),"This is bit of text that's shown when the user hovers the cell."); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1689 |
The cell's tooltip displays the column's caption in its title. How can I get ride of that
public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("C1"); com_Columns.Add("C2"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("tooltip w/h caption"); com_Items.CellToolTip(h,COMVariant::createFromInt(0),"This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title."); com_Items.CellValue(h,COMVariant::createFromInt(1),"tooltip no caption"); com_Items.CellToolTip(h,COMVariant::createFromInt(1),"This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title."); var_Column = COM::createFromObject(exg2antt1.Columns()).Item("C2"); com_Column = var_Column; com_Column.HTMLCaption(com_Column.Caption()); com_Column.Caption(""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1688 |
How can I programmatically show the column's filter
// RClick event - Fired when right mouse button is clicked void onEvent_RClick() { // Columns(c).ShowFilter("-1,-1,128,128") int i; ; i = exg2antt1.ItemFromPoint(-1,-1,c,hit); } public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ShowFocusRect(false); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items ")); com_Column = var_Column; com_Column.DisplayFilterPattern(false); com_Column.FilterList(9472/*exShowExclude | exShowFocusItem | exShowCheckBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item 1"); com_Items.AddItem("Item 2"); com_Items.AddItem("Item 3"); exg2antt1.EndUpdate(); } |
1687 |
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)
// ColumnClick event - Fired after the user clicks on column's header. void onEvent_ColumnClick(COM _Column) { // Column.SortOrder = 1 COM com_Column; anytype var_Column; ; exg2antt1.SortOnClick(-1/*exDefaultSort*/); var_Column = COM::createFromObject(exg2antt1.Columns()).Item("Sort"); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.SortOnClick(1/*exUserSort*/); } public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SortOnClick(1/*exUserSort*/); exg2antt1.Columns().Add("Items"); COM::createFromVariant(exg2antt1.Columns().Add("Sort")).Visible(false); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem("Item 1 (3)"),COMVariant::createFromInt(1),COMVariant::createFromInt(3)); com_Items.CellValue(com_Items.AddItem("Item 2 (1)"),COMVariant::createFromInt(1),COMVariant::createFromInt(1)); com_Items.CellValue(com_Items.AddItem("Item 3 (2)"),COMVariant::createFromInt(1),COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } |
1686 |
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)
// ColumnClick event - Fired after the user clicks on column's header. void onEvent_ColumnClick(COM _Column) { // Column.SortOrder = 1 ; exg2antt1.Items().SortChildren(0,"Sort",true); } public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SortOnClick(1/*exUserSort*/); exg2antt1.Columns().Add("Items"); COM::createFromVariant(exg2antt1.Columns().Add("Sort")).Visible(false); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem("Item 1 (3)"),COMVariant::createFromInt(1),COMVariant::createFromInt(3)); com_Items.CellValue(com_Items.AddItem("Item 2 (1)"),COMVariant::createFromInt(1),COMVariant::createFromInt(1)); com_Items.CellValue(com_Items.AddItem("Item 3 (2)"),COMVariant::createFromInt(1),COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } |
1685 |
How do I get information about control's events
// Event event - Notifies the application once the control fires an event. void onEvent_Event(int _EventID) { ; print( exg2antt1.ExecuteTemplate("EventParam(-2)") ); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.AllowLinkBars(false); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(257/*exOverlaidBarsTransparent | exOverlaidBarsOffset*/); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.EnableItem(h,false); com_Items.ItemData(h,COMVariant::createFromInt(-1)); h = com_Items.AddItem("Item 2"); com_Items.ItemData(h,COMVariant::createFromInt(0)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B"); com_Items.ItemBar(h,"B",28/*exBarCanMoveToAnother*/,COMVariant::createFromBoolean(true)); com_Items.ItemData(com_Items.AddItem("Item 3"),COMVariant::createFromInt(0)); h = com_Items.AddItem("Item 4"); com_Items.EnableItem(h,false); com_Items.ItemData(h,COMVariant::createFromInt(-1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1684 |
How can I sort by two-columns, one by date and one by time
public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSort(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("Index")).FormatColumn("1 index ``"); COM::createFromVariant(com_Columns.Add("Date")).SortType(2/*SortDate*/); var_Column = COM::createFromVariant(com_Columns.Add("Time")); com_Column = var_Column; com_Column.SortType(4/*SortTime*/); com_Column.FormatColumn("time(value)"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213))); h = com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/31/2000",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213))); h = com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 6:00:00",213))); h = com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/31/2000",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 8:00:00",213))); h = com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 8:00:00",213))); h = com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/31/2000",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 6:00:00",213))); exg2antt1.Layout("multiplesort=\"C1:1 C2:1\""); exg2antt1.EndUpdate(); } |
1683 |
I am trying to hide the non-working dates by using the AddNonworkingDate to specify custom non-working dates while NonworkingDays property is 0, but the non-working date is still shown. What can be wrong
|
1682 |
How can I display the task's duration, in days, hours and minutes
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.Width(36); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Duration")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); var_s = "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ?"; var_s = var_s + " =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"; com_Column1.FormatColumn(var_s); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,148); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("4/6/2009",213))); com_Chart.LevelCount(2); com_Chart.UnitScale(65536/*exHour*/); com_Chart.ResizeUnitScale(1048576/*exMinute*/); exg2antt1.Items().AllowCellValueToItemBar(true); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("T1"),"Task",COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 2:30:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 12:35:00",213))); com_Items.AddBar(com_Items.AddItem("T2"),"Task",COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 9:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 10:10:00",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,148); } */ |
1681 |
Does your control support working half-hour/minutes/seconds
public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Column1,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Column1,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.Width(36); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Working")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); var_s = "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ?"; var_s = var_s + " =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"; com_Column1.FormatColumn(var_s); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("4/6/2009",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,148); com_Chart.LevelCount(2); com_Chart.UnitScale(65536/*exHour*/); com_Chart.ResizeUnitScale(1048576/*exMinute*/); com_Chart.ResizeUnitCount(15); com_Chart.NonworkingHours(15728767); com_Chart.ShowNonworkingDates(false); com_Chart.ShowNonworkingUnits(false); com_Chart.ShowNonworkingHours(false); var_Bars = com_Chart.Bars(); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars.Add("Task:Split")); com_Bar = var_Bar; com_Bar.Shortcut("Task"); var_Bar = COM::createFromObject(com_Bars.Item("Task")); com_Bar = var_Bar; com_Bar.Def(20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Chart.AllowLinkBars(false); com_Chart.UnitWidth(26); exg2antt1.Items().AllowCellValueToItemBar(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("T1"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"(weekday(value) in (1,2,3,4,5) and (timeF(value)<\"09:30\" or timeF(value)>=\"17:30\")) or (weekday(value) in (0,6))"); com_Items.AddBar(h,"Task",COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 10:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 12:30:00",213))); h = com_Items.AddItem("T2"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"(weekday(value) in (1,2,3,4,5) and (timeF(value)<\"08:00\" or timeF(value)>=\"16:00\")) or (weekday(value) in (0,6))"); com_Items.AddBar(h,"Task",COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 9:30:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("4/6/2009 10:45:00",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,148); } */ |
1680 |
How can I programmatically move a bar to a specified date-time
public void init() { COM com_Chart,com_Items; COMVariant duration; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Original"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); h = com_Items.AddItem("Moved"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); duration = com_Items.ItemBar(h,"key",513/*exBarDuration*/); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); com_Items.ItemBar(h,"key",513/*exBarDuration*/,duration); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1679 |
How can I programmatically move a bar, with a specified ammount
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Original"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); h = com_Items.AddItem("Moved"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); com_Items.ItemBar(h,"key",514/*exBarMove*/,COMVariant::createFromInt(3)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1678 |
How can I programmatically move a bar to a specified date-time (auto-adjust spans over a non-working period)
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; COMVariant workingCount; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); var_Bars = com_Chart.Bars(); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars.Item("Task")); com_Bar = var_Bar; com_Bar.Def(20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); var_Bar = COM::createFromObject(com_Bars.Add("Task:Split")); com_Bar = var_Bar; com_Bar.Shortcut("Task"); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Original"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); h = com_Items.AddItem("Moved"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); workingCount = com_Items.ItemBar(h,"key",258/*exBarWorkingCount*/); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); com_Items.ItemBar(h,"key",258/*exBarWorkingCount*/,workingCount); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1677 |
How can I programmatically move a bar, with a specified ammount (auto-adjust spans over a non-working period)
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); var_Bars = com_Chart.Bars(); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars.Item("Task")); com_Bar = var_Bar; com_Bar.Def(20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); var_Bar = COM::createFromObject(com_Bars.Add("Task:Split")); com_Bar = var_Bar; com_Bar.Shortcut("Task"); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Original"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); h = com_Items.AddItem("Moved"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"key"); com_Items.ItemBar(h,"key",514/*exBarMove*/,COMVariant::createFromInt(3)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1676 |
How can I show a secondary curve, line in the control's histogram
public void init() { COM com_Bar,com_Bar1,com_Chart,com_Items,com_Level; anytype var_Bar,var_Bar1,var_Chart,var_Items,var_Level; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); exg2antt1.AntiAliasing(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/9/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(1136/*exHistogramNoGrouping | exHistogramAllItems*/); com_Chart.HistogramHeight(128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramItems(8); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.Label("<font ;3><%d%>"); com_Chart.UnitWidth(9); var_Bar1 = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar1 = var_Bar1; com_Bar1.HistogramPattern(1024/*exRoundCurve*/); com_Bar1.HistogramColor(WinApi::RGB2int(255,0,0)); com_Bar1.HistogramType(0/*exHistOverload*/); com_Bar1.HistogramItems(8); com_Bar1.HistogramBorderSize(1); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,1); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.ItemHeight(h,0); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("1/1/2005",213)),COMVariant::createFromDate(str2Date("12/31/2005",213)),"1"); com_Items.ItemBar(h,"1",21/*exBarEffort*/,"(value mod 31) array (1,1,1,2,1,2.5,3,4,5,4,3,2,1,2,2,3,4.5,4,5,6,7,6,1,2,3,1,1,1,2,3,2,2)"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("7/16/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"weekday(value) in (0,6) ? 0.25 : 2"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/18/2005",213)),COMVariant::createFromDate(str2Date("7/21/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"weekday(value) = 1 ? 2.5 : .5"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1675 |
How can I add an owner-draw bar
// AfterDrawPart event - Occurs right after drawing the part of the control. void onEvent_AfterDrawPart(int _Part,int _hDC,int _X,int _Y,int _Width,int _Height) { ; print( "AfterDrawPart" ); print( _Part ); print( exg2antt1.Items().CellCaption(exg2antt1.DrawPartItem(),COMVariant::createFromInt(0)) ); print( exg2antt1.DrawPartKey() ); } // BeforeDrawPart event - Occurs just before drawing a part of the control. void onEvent_BeforeDrawPart(int _Part,int _hDC,COMVariant /*long*/ _X,COMVariant /*long*/ _Y,COMVariant /*long*/ _Width,COMVariant /*long*/ _Height,COMVariant /*bool*/ _Cancel) { ; _Cancel = true; print( "BeforeDrawPart" ); print( _Part ); print( exg2antt1.Items().CellCaption(exg2antt1.DrawPartItem(),COMVariant::createFromInt(0)) ); print( exg2antt1.DrawPartKey() ); } public void init() { COM com_Bars,com_Chart,com_Items; anytype var_Bars,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; com_Bars.Add("OwnerDraw"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Draw-Item-Bar-1"),"OwnerDraw",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Draw-Item-Bar-2"),"OwnerDraw",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K1"); com_Items.ItemBar(0,"<*>",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1674 |
Is it possible to show a status left or right to the bar (method 2, exBarFrameColor, EBN)
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAAChABP0IQAAYAQGKIaBoAKBQAGaAoDDYMQyQwAAxDOKsEwsACEIrjKCRShyCYZRrGUQyAKESRAGyTJBlKKodgOLYYSrFcgSIAsEhqGASRZGUBIJD"; var_s = var_s + "EMI4AJPIwxNIDfyNGKWI6gOQKIoSCYlU7IED0fQNGxVF6XaYqYAIRDINQlVzXcQzPYEbRxCKLKppWqIfpuSIBgI="; com_Appearance.Add(2,COMVariant::createFromStr(var_s)); com_Appearance.Add(1,"CP:2 -8 -1 0 0"); com_Appearance.Add(3,"CP:2 0 -1 0 0"); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Red-Status-Outside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(16777471)); h = com_Items.AddItem("Blue-Status-Outside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(33488896)); h = com_Items.AddItem("Red-Status-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(50331903)); h = com_Items.AddItem("Blue-Status-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(67043328)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1673 |
Is it possible to show a status left or right to the bar (method 1, exBarBackgroundExt)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Red-Left-Status-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"left[6,back=RGB(255,0,0)]"); h = com_Items.AddItem("Blue-Left-Status-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"left[6,back=RGB(0,0,255)]"); h = com_Items.AddItem("Red-Right-Status-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"right[6,back=RGB(255,0,0)]"); h = com_Items.AddItem("Blue-Right-Status-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"right[6,back=RGB(0,0,255)]"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1672 |
How can I use the ItemBar(exBarBackgroundExt) property for a bar
public void init() { COM com_Bar,com_Chart,com_Items,com_Level; anytype var_Bar,var_Chart,var_Items,var_Level; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(31); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.GridLineColor(WinApi::RGB2int(224,224,224)); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.GridLineColor(exg2antt1.GridLineColor()); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.GridLineColor(exg2antt1.GridLineColor()); com_Chart.ShowNonworkingDates(false); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Height(21); com_Chart.DrawGridLines(-1/*exAllLines*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Normal"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h = com_Items.AddItem("Red-Frame-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"[frame=RGB(255,0,0),framethick]"); h = com_Items.AddItem("LR-Margins"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"); h = com_Items.AddItem("LR-Margins (front)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"); com_Items.ItemBar(h,"K1",54/*exBarBackgroundExtFlags*/,COMVariant::createFromInt(2)); h = com_Items.AddItem("LR-Margins (back)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"); com_Items.ItemBar(h,"K1",54/*exBarBackgroundExtFlags*/,COMVariant::createFromInt(3)); h = com_Items.AddItem("TB-Margins"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"top[4,back=RGB(255,0,0)],bottom[4,back=RGB(0,255,0)]"); h = com_Items.AddItem("TB-Margins"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"top[2,back=RGB(255,0,0)],bottom[2,back=RGB(0,255,0)]"); com_Items.ItemBar(h,"K1",54/*exBarBackgroundExtFlags*/,COMVariant::createFromInt(2)); h = com_Items.AddItem("Caption(back)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"client(bottom[14,text=`<sha ;;0><font ;8>background`,align=0x11])"); com_Items.ItemBar(h,"K1",54/*exBarBackgroundExtFlags*/,COMVariant::createFromInt(2)); h = com_Items.AddItem("Pattern-Outside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"bottom[10%,pattern=7,frame]"); com_Items.ItemBar(h,"K1",54/*exBarBackgroundExtFlags*/,COMVariant::createFromInt(2)); h = com_Items.AddItem("Pattern-Inside"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/13/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"bottom[7,pattern=3,frame]"); h = com_Items.AddItem("Pattern-Inside-Caption"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"K1"); var_s = "top[4](left[4],right[4],client),bottom[4](left[4],right[4],client),left[4],right[4],client(left[75%,text=`<fgcolor FFFFFF>75%`,a"; var_s = var_s + "lign=0x11,pattern=0x001,frame=RGB(255,0,0)])"; com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,COMVariant::createFromStr(var_s)); h = com_Items.AddItem("Complex(back)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])"); com_Items.ItemBar(h,"K1",54/*exBarBackgroundExtFlags*/,COMVariant::createFromInt(3)); h = com_Items.AddItem("Complex(inside)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"K1"); com_Items.ItemBar(h,"K1",53/*exBarBackgroundExt*/,"top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1671 |
How can display seconds
public void init() { COM com_Chart,com_Items,com_Level; anytype var_Chart,var_Items,var_Level; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/17/2008",213))); com_Chart.LevelCount(2); com_Chart.UnitScale(16777216/*exSecond*/); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.Alignment(17/*exHOutside | CenterAlignment*/); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.FormatLabel("(0:=sec(dvalue)) mod 10 ? 0=: : '<c><font ;6>sec<br><b>' + 0=:"); exg2antt1.Columns().Add("Tasks"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromUtcDateTime(str2Datetime("1/17/2008 0:00:02",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/17/2008 0:00:08",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromUtcDateTime(str2Datetime("1/17/2008 0:00:05",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/17/2008 0:00:15",213))); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1670 |
How can I check if an item contains a bar
// SelectionChanged event - Fired after a new item has been selected. void onEvent_SelectionChanged() { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; print( "Count of A: " ); print( com_Items.ItemBar(com_Items.FocusItem(),"A",256/*exBarsCount*/) ); print( "Count of B: " ); print( com_Items.ItemBar(com_Items.FocusItem(),"B",256/*exBarsCount*/) ); print( "Count of C: " ); print( com_Items.ItemBar(com_Items.FocusItem(),"C",256/*exBarsCount*/) ); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"B","B"); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"C","C"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1669 |
How can I connect to a DBF file
|
1668 |
How do I get the caption with no HTML format
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("This is a bit of <b>HTML-formatted</b> text"); com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/); com_Items.AddItem(COMVariant::createFromStr(com_Items.CellCaption(h,COMVariant::createFromInt(0)))); } |
1667 |
How can I change the bar's color based on its length/duration
public void init() { COM com_Chart,com_Column,com_Columns,com_ConditionalFormat,com_Editor,com_Items; anytype var_Chart,var_Column,var_Columns,var_ConditionalFormat,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Duration")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/6/2005",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%1 >= 4"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.ApplyTo(1); com_ConditionalFormat.Bold(true); com_ConditionalFormat.ApplyToBars("Task"); com_ConditionalFormat.BarColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat.ForeColor(com_ConditionalFormat.BarColor()); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("6/13/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/11/2005",213)),COMVariant::createFromDate(str2Date("6/16/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/12/2005",213)),COMVariant::createFromDate(str2Date("6/15/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1666 |
Is it possible to colorize the bars based on its starting/ending date
public void init() { COM com_Chart,com_Column,com_Columns,com_ConditionalFormat,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms,com_Items; anytype var_Chart,var_Column,var_Columns,var_ConditionalFormat,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.OnResizeControl(129/*exDisableSplitter | exResizeChart*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("5/31/2005",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = com_Chart.DefaultInsideZoomFormat(); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.PatternChart(6/*exPatternBDiagonal*/); com_InsideZoomFormat.PatternColorChart(WinApi::RGB2int(255,0,0)); com_InsideZoomFormat.ForeColor(com_InsideZoomFormat.PatternColorChart()); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(18); var_InsideZoom = COM::createFromObject(com_InsideZooms.Add(COMVariant::createFromDate(str2Date("6/10/2005",213)))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%1 <= #6/10/2005#"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.ApplyToBars("Task"); com_ConditionalFormat.BarColor(WinApi::RGB2int(255,0,0)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("6/14/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/11/2005",213)),COMVariant::createFromDate(str2Date("6/15/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/12/2005",213)),COMVariant::createFromDate(str2Date("6/16/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1665 |
How can I change the bar's color based on values on the columns
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Chart,com_Column,com_ConditionalFormat,com_ConditionalFormat1,com_ConditionalFormat2,com_ConditionalFormats,com_Items,com_rs; anytype rs,var_Chart,var_Column,var_ConditionalFormat,var_ConditionalFormat1,var_ConditionalFormat2,var_ConditionalFormats,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/3/1994",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); com_Chart.LevelCount(2); com_Chart.UnitScale(4096/*exDay*/); com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); exg2antt1.ColumnAutoResize(false); exg2antt1.ContinueColumnScroll(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_ConditionalFormats = exg2antt1.ConditionalFormats(); com_ConditionalFormats = var_ConditionalFormats; var_ConditionalFormat = com_ConditionalFormats.Add("1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.ApplyTo(1); com_ConditionalFormat.Bold(true); com_ConditionalFormat.BackColor(WinApi::RGB2int(250,250,250)); var_ConditionalFormat1 = com_ConditionalFormats.Add("%1 = 5"); com_ConditionalFormat1 = var_ConditionalFormat1; com_ConditionalFormat1.ApplyToBars("Task"); com_ConditionalFormat1.BarColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat1.ForeColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat1.BarOverviewColor(WinApi::RGB2int(255,0,0)); var_ConditionalFormat2 = com_ConditionalFormats.Add("%1 = 3"); com_ConditionalFormat2 = var_ConditionalFormat2; com_ConditionalFormat2.ApplyToBars("Task"); com_ConditionalFormat2.BarColor(WinApi::RGB2int(0,255,0)); com_ConditionalFormat2.ForeColor(WinApi::RGB2int(0,255,0)); com_ConditionalFormat2.BarOverviewColor(WinApi::RGB2int(0,255,0)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1664 |
How can I display / specify a fixed percent for the task in the histogram, no matter how long the task is
public void init() { COM com_Bar,com_Bar1,com_Bar2,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bar2,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(32); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.UnitWidth(32); com_Chart.LevelCount(2); com_Chart.NonworkingDays(0); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.HistogramHeight(64); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(1/*exHistOverAllocation*/); com_Bar.ShowHistogramValues(1); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","TaskFixed"); com_Bar1 = var_Bar1; com_Bar1.HistogramType(513/*exHistOverAllocationFixed | exHistOverAllocation*/); com_Bar1.ShowHistogramValues(1); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar2 = COM::createFromObject(com_Bars).Copy("Task","TaskMultiply"); com_Bar2 = var_Bar2; com_Bar2.HistogramType(1025/*exHistOverAllocationMultiply | exHistOverAllocation*/); com_Bar2.ShowHistogramValues(1); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Allocation"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/23/2005",213)),"A","Effort/Length"); com_Items.ItemBar(h,"A",21/*exBarEffort*/,COMVariant::createFromReal(0.25)); com_Items.ItemBar(h,"A",5/*exBarVAlignCaption*/,COMVariant::createFromInt(18)); com_Items.AddBar(h,"TaskFixed",COMVariant::createFromDate(str2Date("6/24/2005",213)),COMVariant::createFromDate(str2Date("6/26/2005",213)),"B","Effort"); com_Items.ItemBar(h,"B",21/*exBarEffort*/,COMVariant::createFromReal(0.25)); com_Items.ItemBar(h,"B",5/*exBarVAlignCaption*/,COMVariant::createFromInt(18)); com_Items.AddBar(h,"TaskMultiply",COMVariant::createFromDate(str2Date("6/27/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213)),"C","Effort*Length"); com_Items.ItemBar(h,"C",21/*exBarEffort*/,COMVariant::createFromReal(0.25)); com_Items.ItemBar(h,"C",5/*exBarVAlignCaption*/,COMVariant::createFromInt(18)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
1663 |
Does your control supports scrolling by touching the screen
|
1662 |
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (zoom-onfly)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.UnitScale(4096/*exDay*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.AllowZoomOnFly(24/*exZoomOnFly*/); com_Chart.ResizeUnitScale(65536/*exHour*/); com_Chart.ResizeUnitCount(4); com_Chart.Label(65536/*exHour*/,"<font ;5><b><%h%><br><%AM/PM%></b></font><||>4<||>65536"); com_Chart.ZoomOnFlyCaption("<br><c><b><font ;12><%=%C0%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"T1","T1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"T3","T3"); h = com_Items.AddItem(); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); com_Items.SelectableItem(h,false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
1661 |
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (inside-zoom)
|
1660 |
How can I export the control's content to a PDF document (method 1)
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items,com_Print; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items,var_Print; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); com_Chart.LevelCount(2); com_Chart.ShowEmptyBars(1); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2009",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2009",213)),COMVariant::createFromDate(str2Date("1/7/2009",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2009",213)),COMVariant::createFromDate(str2Date("1/9/2009",213))); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.PrintExt(exg2antt1); com_Print.CopyTo("c:/temp/xtest.pdf"); print( "Look for C:\\Temp\\xtest.pdf file." ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1659 |
How can I export the control's content to a PDF document (method 2)
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; COMVariant var_CopyTo; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); com_Chart.LevelCount(2); com_Chart.ShowEmptyBars(1); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2009",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2009",213)),COMVariant::createFromDate(str2Date("1/7/2009",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2009",213)),COMVariant::createFromDate(str2Date("1/9/2009",213))); var_CopyTo = exg2antt1.CopyTo("c:/temp/xtest.pdf"); print( "Look for C:\\Temp\\xtest.pdf file." ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1658 |
Today date is shown, if we use the Column.FormatColumn and Editor.Option(exDateAllowNullDate) properties. What can be done
public void init() { COM com_Column,com_Editor,com_Items; anytype var_Column,var_Editor,var_Items; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Date")); com_Column = var_Column; var_s = "len(value) ? ( (longdate(date(value)) left 3) + ' ' + day(date(value)) + '/' + month(date(value)) + '/' + (year(date(value)) rig"; var_s = var_s + "ht 2) ) : '' )"; com_Column.FormatColumn(var_s); var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Editor.Option(14/*exDateAllowNullDate*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("5/12/2012",213))); com_Items.AddItem(); com_Items.AddItem(COMVariant::createFromDate(str2Date("5/14/2012",213))); exg2antt1.EndUpdate(); } |
1657 |
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(_Item,COMVariant::createFromInt(2),com_Items.CellState(_Item,COMVariant::createFromInt(0))); } public void init() { COM com_Column,com_ConditionalFormat,com_Items; anytype var_Column,var_ConditionalFormat,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ShowFocusRect(false); exg2antt1.SelBackMode(1/*exTransparent*/); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%2 != 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); com_ConditionalFormat.ForeColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat.ApplyTo(-1/*exFormatToItems*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Width(16); com_Column.AllowSizing(false); exg2antt1.Columns().Add("Information"); COM::createFromVariant(exg2antt1.Columns().Add("Hidden")).Visible(false); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem(""),COMVariant::createFromInt(1),"This is a bit of text associated"); h = com_Items.AddItem(""); com_Items.CellValue(h,COMVariant::createFromInt(1),"This is a bit of text associated"); com_Items.CellState(h,COMVariant::createFromInt(0),1); com_Items.CellValue(com_Items.AddItem(""),COMVariant::createFromInt(1),"This is a bit of text associated"); exg2antt1.EndUpdate(); } |
1656 |
How can I hide the items/grid section of the control
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.OnResizeControl(129/*exDisableSplitter | exResizeChart*/); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/9/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.HistogramHeight(128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("6/14/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/11/2005",213)),COMVariant::createFromDate(str2Date("6/15/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/12/2005",213)),COMVariant::createFromDate(str2Date("6/16/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1655 |
How can I draw an extra line which could indicate deadline for my tasks
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(24); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAAChABLMIQAAYAQGKIaBoAKBQAGaAoDDQOQ4QwAAxjAKUEwsACEIrjKCYVgOHYYRrIIEvZAAMIlSbCMoxcAsSQSf6YJBmKL4fiWMobRCMQyiLLMdw"; var_s = var_s + "iGoYJ4hGgKChqI43RZNErURRkEwCgIA="; com_Appearance.Add(2,COMVariant::createFromStr(var_s)); com_Appearance.Add(1,"CP:2 0 -4 0 4"); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Default"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(16777471)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/9/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"K2"); com_Items.ItemBar(h,"K2",51/*exBarFrameColor*/,COMVariant::createFromInt(33488896)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1654 |
How can I mark/highlight a zone in the control's histogram
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/9/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.HistogramHeight(128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramItems(12); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("6/14/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/11/2005",213)),COMVariant::createFromDate(str2Date("6/15/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/12/2005",213)),COMVariant::createFromDate(str2Date("6/16/2005",213)),""); exg2antt1.Chart().MarkTimeZone("zone",COMVariant::createFromDate(str2Date("6/13/2005",213)),COMVariant::createFromDate(str2Date("6/14/2005",213)),COMVariant::createFromInt(15790320),";;;;histogram;1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1653 |
How can I get the min/max values from the histogram
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COM com_Chart; anytype var_Chart; ; var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; print( "Value" ); print( com_Chart.HistogramValue(com_Chart.DateFromPoint(-1,-1)) ); print( "MIN" ); print( com_Chart.HistogramValue("min") ); print( "MAX" ); print( com_Chart.HistogramValue("max") ); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/9/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.HistogramHeight(128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramItems(12); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("6/14/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/11/2005",213)),COMVariant::createFromDate(str2Date("6/15/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("6/12/2005",213)),COMVariant::createFromDate(str2Date("6/16/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1652 |
How can I assign different efforts(expression) to the same bar
public void init() { COM com_Bar,com_Chart,com_Items,com_Level; anytype var_Bar,var_Chart,var_Items,var_Level; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/9/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.HistogramHeight(128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramItems(12); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.Label("<font ;3><%d%>"); com_Chart.UnitWidth(9); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("6/14/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"weekday(value) in (0,6) ? 0.25 : 2"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/18/2005",213)),COMVariant::createFromDate(str2Date("6/21/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"weekday(value) = 1 ? 2 : 1"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/27/2005",213)),COMVariant::createFromDate(str2Date("7/9/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"month (value) = 7 ? 1 : 0"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/27/2005",213)),COMVariant::createFromDate(str2Date("7/5/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"(month(value)=month(value+1)) ? 1 : 0"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/22/2005",213)),COMVariant::createFromDate(str2Date("6/26/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"int(value-start) ? 1 : 2"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("7/10/2005",213)),COMVariant::createFromDate(str2Date("7/14/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"(int(value-start) and int(end-value) != 0 ) ? 1 : 2"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("7/15/2005",213)),COMVariant::createFromDate(str2Date("7/22/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"(int(value-start)+1) mod 2 ? 1 : 0"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1651 |
How can I prevent showing the representation of the bar on the week days, nonworking part
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/9/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.HistogramHeight(128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramItems(12); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/10/2005",213)),COMVariant::createFromDate(str2Date("6/21/2005",213)),""); com_Items.ItemBar(h,"",21/*exBarEffort*/,"weekday(value) in (0,6) ? 0 : 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1650 |
How do I programatically focus a cell
// FocusChanged event - Occurs when a cell gets the focus. void onEvent_FocusChanged() { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellBackColor(com_Items.FocusItem(),exg2antt1.FocusColumnIndex(),WinApi::RGB2int(255,0,0)); } public void init() { COM com_Columns,com_Items,com_Items1; anytype var_Columns,var_Items,var_Items1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelForeColor(exg2antt1.ForeColor()); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.DrawGridLines(-2/*exRowLines*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Column1"); com_Columns.Add("Column2"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem("Cell 1.1"),COMVariant::createFromInt(1),"Cell 1.2"); com_Items.CellValue(com_Items.AddItem("Cell 2.1"),COMVariant::createFromInt(1),"Cell 2.2"); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; com_Items1.SelectItem(com_Items1.ItemByIndex(1),true); exg2antt1.FocusColumnIndex(1); exg2antt1.EndUpdate(); } |
1649 |
How do I programatically focus a cell (excrd)
// FocusChanged event - Occurs when a cell gets the focus. void onEvent_FocusChanged() { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellBackColor(com_Items.FocusItem(),exg2antt1.FocusColumnIndex(),WinApi::RGB2int(255,0,0)); } public void init() { COM com_Column,com_Columns,com_Items,com_Items1; anytype var_Column,var_Columns,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelForeColor(exg2antt1.ForeColor()); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.DefaultItemHeight(36); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("Column1")).Visible(false); COM::createFromVariant(com_Columns.Add("Column2")).Visible(false); COM::createFromVariant(com_Columns.Add("Column3")).Visible(false); var_Column = COM::createFromVariant(com_Columns.Add("FormatLevel")); com_Column = var_Column; com_Column.FormatLevel("(0/1),2"); com_Column.Def(32/*exCellFormatLevel*/,COMVariant::createFromStr(com_Column.FormatLevel())); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Cell 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.3"); h = com_Items.AddItem("Cell 2.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 2.3"); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; com_Items1.SelectItem(com_Items1.ItemByIndex(1),true); exg2antt1.FocusColumnIndex(2); exg2antt1.EndUpdate(); } |
1648 |
How can I get task's user data ( exBarData ) when user double clicks the bar
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void onEvent_DblClick(int _Shift,int _X,int _Y) { COMVariant key; int item; ; item = exg2antt1.ItemFromPoint(-1,-1,c,hit); key = exg2antt1.Chart().BarFromPoint(-1,-1); print( exg2antt1.Items().ItemBar(item,key,17/*exBarData*/) ); } public void init() { COM com_Items; COMVariant key; anytype var_Items; int h,item; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),""); com_Items.ItemBar(h,"",17/*exBarData*/,"this is a bit of extra data associated with task 1"); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),""); com_Items.ItemBar(h,"",17/*exBarData*/,"this is a bit of extra data associated with task 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1647 |
How do I get arranged the levels to display, weeks, days and so on
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.UnitWidth(24); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.LevelCount(2); com_Chart.FirstWeekDay(1/*exMonday*/); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Alignment(1/*CenterAlignment*/); com_Level.Label("<b><Font Tahoma;7><%m3%>, <%yyyy%></b><b>, <Font Tahoma;7>Wk <%ww%>"); com_Level.Unit(256/*exWeek*/); com_Level.DrawGridLines(true); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Alignment(1/*CenterAlignment*/); com_Level1.Label("<Font Tahoma;7><%d%>"); com_Level1.Unit(4096/*exDay*/); com_Chart.DrawGridLines(-1/*exAllLines*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
1646 |
How can I add a task and a milestone to the same item
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Milestone",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/2/2001",213)),"MKey"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); } |
1645 |
How can I change the visual appearance of the buttons on the control's overview part
|
1644 |
Is there a way to show the Start and End dates in mm-dd-yyyy format
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/25/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Def(19/*exCellValueToItemBarKey*/,"K1"); com_Column.FormatColumn("(0 array (0:=(shortdateF(value) split `/`))) + `-` + (1 array (=:0) ) + `-` + (2 array (=:0) )"); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Def(19/*exCellValueToItemBarKey*/,"K1"); com_Column1.FormatColumn("shortdateF(value) replace `/` with `-`"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem(),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem(),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1643 |
Is there a way to show the Start and End dates in dd-mm-yyyy format
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/25/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Def(19/*exCellValueToItemBarKey*/,"K1"); com_Column.FormatColumn("(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Def(19/*exCellValueToItemBarKey*/,"K1"); com_Column1.FormatColumn("(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem(),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem(),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1642 |
If we have bars with dark color, we use white font/color. But if the bars are too small for the caption, you cant read it. What can we do
public void init() { COM com_Bar,com_Bar1,com_Bar2,com_Items; anytype var_Bar,var_Bar1,var_Bar2,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,48); var_Bar = COM::createFromObject(exg2antt1.Chart().Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Height(17); var_Bar1 = COM::createFromObject(exg2antt1.Chart().Bars()).Item("Progress"); com_Bar1 = var_Bar1; com_Bar1.Pattern(1/*exPatternSolid*/); com_Bar1.Height(17); com_Bar1.Shape(1/*exShapeSolid*/); com_Bar1.Color(WinApi::RGB2int(0,0,255)); var_Bar2 = COM::createFromObject(exg2antt1.Chart().Bars()).Add("Task%Progress"); com_Bar2 = var_Bar2; com_Bar2.Pattern(1/*exPatternSolid*/); com_Bar2.Height(17); com_Bar2.Shortcut("Percent"); exg2antt1.DefaultItemHeight(21); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),""); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(4112616)); com_Items.ItemBar(h,"",3/*exBarCaption*/,"<fgcolor=FFFFFF><sha 0;;0>Pause"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/9/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"white"); com_Items.ItemBar(h,"white",33/*exBarColor*/,COMVariant::createFromInt(4112616)); com_Items.ItemBar(h,"white",3/*exBarCaption*/,"<fgcolor=FFFFFF>Pause"); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),""); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(2017557)); com_Items.ItemBar(h,"",3/*exBarCaption*/,"<fgcolor=FFFFFF><sha 0;;0>Production"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"white"); com_Items.ItemBar(h,"white",33/*exBarColor*/,COMVariant::createFromInt(2017557)); com_Items.ItemBar(h,"white",3/*exBarCaption*/,"<fgcolor=FFFFFF>Production"); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Percent",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),""); com_Items.ItemBar(h,"",12/*exBarPercent*/,COMVariant::createFromReal(0.5)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(2017557)); com_Items.ItemBar(h,"",3/*exBarCaption*/,"<fgcolor=FFFFFF><sha 0;;0>Pausing"); com_Items.AddBar(h,"Percent",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"white"); com_Items.ItemBar(h,"white",12/*exBarPercent*/,COMVariant::createFromReal(0.5)); com_Items.ItemBar(h,"white",33/*exBarColor*/,COMVariant::createFromInt(2017557)); com_Items.ItemBar(h,"white",3/*exBarCaption*/,"<fgcolor=FFFFFF>Pausing"); h = com_Items.AddItem("Task 4"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),""); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(8421504)); com_Items.ItemBar(h,"",3/*exBarCaption*/,"<fgcolor=FFFFFF><sha 0;;0>Planned downtime"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"white"); com_Items.ItemBar(h,"white",33/*exBarColor*/,COMVariant::createFromInt(8421504)); com_Items.ItemBar(h,"white",3/*exBarCaption*/,"<fgcolor=FFFFFF>Planned downtime"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1641 |
How do I programmatically exclude items from the filter
public void init() { COM com_Column,com_Column1,com_Items; anytype var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(9472/*exShowExclude | exShowFocusItem | exShowCheckBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item 1"); com_Items.AddItem("Item 2"); com_Items.AddItem("Item 3"); com_Items.AddItem("Item 4"); var_Column1 = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1; com_Column1.FilterType(752/*exFilterExclude | exFilter*/); com_Column1.Filter("Item 1|Item 4"); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } |
1640 |
How do I show in histogram, more values for a single task
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void onEvent_BeforeExpandItem(int _Item,COMVariant /*variant*/ _Cancel) { ; _Cancel = true; } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,hR; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(true); exg2antt1.ExpandOnDblClick(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.AllowLinkBars(false); com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(167); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,128); com_Chart.HistogramView(1040/*exHistogramNoGrouping | exHistogramUnlockedItems*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramType(256/*exHistCumulative*/); com_Bar.HistogramItems(6); com_Bar.HistogramPattern(1/*exPatternSolid*/); com_Bar.HistogramItems(-40000); com_Bar.HistogramCriticalValue(100000); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(128,128,128)); com_Bar.HistogramCumulativeColors(3); com_Chart.ShowNonworkingDates(false); COM::createFromVariant(exg2antt1.Columns().Add("Costs")).Visible(false); COM::createFromVariant(exg2antt1.Columns().Add("Tasks")).Visible(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Estimated"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213))); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(8000)); hR = com_Items.InsertItem(h,,"Actual"); com_Items.AddBar(hR,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213))); com_Items.ItemBar(hR,"",21/*exBarEffort*/,COMVariant::createFromInt(9000)); com_Items.GroupBars(h,"",true,hR,"",true); com_Items.GroupBars(h,"",false,hR,"",false); hR = com_Items.InsertItem(h,,"Cost"); com_Items.AddBar(hR,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213))); com_Items.ItemBar(hR,"",21/*exBarEffort*/,COMVariant::createFromInt(200)); com_Items.GroupBars(h,"",true,hR,"",true); com_Items.GroupBars(h,"",false,hR,"",false); h = com_Items.AddItem("Estimated"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/9/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213))); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(7000)); hR = com_Items.InsertItem(h,,"Actual"); com_Items.AddBar(hR,"Task",COMVariant::createFromDate(str2Date("1/9/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213))); com_Items.ItemBar(hR,"",21/*exBarEffort*/,COMVariant::createFromInt(8000)); com_Items.GroupBars(h,"",true,hR,"",true); com_Items.GroupBars(h,"",false,hR,"",false); hR = com_Items.InsertItem(h,,"Cost"); com_Items.AddBar(hR,"Task",COMVariant::createFromDate(str2Date("1/9/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213))); com_Items.ItemBar(hR,"",21/*exBarEffort*/,COMVariant::createFromInt(150)); com_Items.GroupBars(h,"",true,hR,"",true); com_Items.GroupBars(h,"",false,hR,"",false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,128); } */ |
1639 |
How can I align the caption of the bar
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/25/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","exBarHAlignCaption = 0"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(0)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","exBarHAlignCaption = 1"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(1)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","exBarHAlignCaption = 2"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(2)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","Clip 3"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(3)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","Clip 4"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(4)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","Clip 5"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(5)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","Outside Left 16"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","Outside Right 18"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K","Outside Center 17"); com_Items.ItemBar(h,"K",4/*exBarHAlignCaption*/,COMVariant::createFromInt(17)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1638 |
How can I change the drop down filter background color
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Background(26/*exBackColorFilter*/,WinApi::RGB2int(255,255,255)); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(1315/*exShowFocusItem | exShowCheckBox | exSortItemsAsc | exLeafItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"Child 3"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } |
1637 |
How can I arrange the columns using CRD (eXCRD ) strings (Sample 2)
public void init() { COM com_Chart,com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Chart,var_Column,var_Column1,var_Column2,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.DefaultItemHeight(36); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("C1")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Width(18); com_Column.AllowSizing(false); var_Column1 = COM::createFromVariant(com_Columns.Add("C2")); com_Column1 = var_Column1; com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column1.Width(18); COM::createFromVariant(com_Columns.Add("Column1")).Visible(false); COM::createFromVariant(com_Columns.Add("Column2")).Visible(false); COM::createFromVariant(com_Columns.Add("Column3")).Visible(false); var_Column2 = COM::createFromVariant(com_Columns.Add("FormatLevel")); com_Column2 = var_Column2; com_Column2.FormatLevel("18;\"Info\"[a=17]/(2/3,4)"); com_Column2.Def(32/*exCellFormatLevel*/,"2/3,4"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/22/2014",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Cell 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/23/2014",213)),COMVariant::createFromDate(str2Date("6/25/2014",213))); h = com_Items.AddItem("Cell 2.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 2.3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/26/2014",213)),COMVariant::createFromDate(str2Date("6/28/2014",213))); exg2antt1.EndUpdate(); } |
1636 |
How can I arrange the columns using CRD (eXCRD ) strings (Sample 1)
public void init() { COM com_Chart,com_Column,com_Columns,com_Items; anytype var_Chart,var_Column,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.DefaultItemHeight(36); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("Column1")).Visible(false); COM::createFromVariant(com_Columns.Add("Column2")).Visible(false); COM::createFromVariant(com_Columns.Add("Column3")).Visible(false); var_Column = COM::createFromVariant(com_Columns.Add("FormatLevel")); com_Column = var_Column; com_Column.FormatLevel("(0/1),2"); com_Column.Def(32/*exCellFormatLevel*/,COMVariant::createFromStr(com_Column.FormatLevel())); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/22/2014",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Cell 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/23/2014",213)),COMVariant::createFromDate(str2Date("6/25/2014",213))); h = com_Items.AddItem("Cell 2.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 2.3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/26/2014",213)),COMVariant::createFromDate(str2Date("6/28/2014",213))); exg2antt1.EndUpdate(); } |
1635 |
How do I display the histogram for filtered items only
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(32); com_Chart.HistogramView(128/*exHistogramFilteredItems*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(6/*exPatternBDiagonal*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Column")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.Filter("Item 1"); com_Column.FilterType(240/*exFilter*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } |
1634 |
How can I use no scroll bars for touch-screens
|
1633 |
How can I display values in the histogram legend
public void init() { COM com_Bar,com_Chart,com_Column,com_Editor,com_Items; anytype var_Bar,var_Chart,var_Column,var_Editor,var_Items; int h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Effort")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(21)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.NonworkingDays(0); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(128); com_Chart.HistogramView(112/*exHistogramAllItems*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramCriticalValue(3); com_Bar.HistogramItems(-7); com_Bar.HistogramGridLinesColor(WinApi::RGB2int(192,192,192)); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/23/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(4)); h1 = com_Items.AddItem("Task 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/24/2005",213)),COMVariant::createFromDate(str2Date("6/26/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(3)); h1 = com_Items.AddItem("Task 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/27/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(2)); h1 = com_Items.AddItem("Task 4"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/30/2005",213)),COMVariant::createFromDate(str2Date("7/2/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1632 |
I am using AllowGroupBy property and calling the Column.SortOrder property groups by that column. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's GroupBy bar
|
1631 |
Calling programatically the Column.SortOrder property adds the column to the sort bar. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's Sort bar
|
1630 |
How can I specify different working parts for different items
public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Column1,com_Columns,com_InsideZoomFormat,com_InsideZooms,com_Items,com_Level; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Column1,var_Columns,var_InsideZoomFormat,var_InsideZooms,var_Items,var_Level; int h1,h2; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Working")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); com_Column.Def(19/*exCellValueToItemBarKey*/,"A"); com_Column.FormatColumn("(0:=round(value*24)) != 0 ? =:0 : ''"); var_Column1 = COM::createFromVariant(com_Columns.Add("NonWorking")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(259)); com_Column1.Def(19/*exCellValueToItemBarKey*/,"A"); com_Column1.FormatColumn("(0:=round(value*24)) != 0 ? =:0 : ''"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,78); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.DrawLevelSeparator(false); com_Chart.LevelCount(3); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.DrawGridLines(false); com_Chart.AllowInsideZoom(true); com_Chart.DrawDateTicker(true); com_Chart.DateTickerLabel("<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>"); com_Chart.MarkSelectDateColor(0x7ffff8ee); var_InsideZoomFormat = com_Chart.DefaultInsideZoomFormat(); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.OwnerLabel("<%mmm%> <%d%>"); com_InsideZoomFormat.BackColor(WinApi::RGB2int(238,248,255)); com_InsideZoomFormat.BackColorChart(com_InsideZoomFormat.BackColor()); com_InsideZoomFormat.InsideCount(4); com_InsideZoomFormat.InsideLabel("<b><%hh%></b>"); var_InsideZooms = COM::createFromObject(com_Chart.InsideZooms()); com_InsideZooms = var_InsideZooms; com_InsideZooms.Add(COMVariant::createFromDate(str2Date("6/22/2005",213))); com_Chart.DrawGridLines(2/*exVLines*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Split"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(255,0,0)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(255,0,0)); com_Bar.Pattern(6/*exPatternBDiagonal*/); com_Bar.Shortcut("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromUtcDateTime(str2Datetime("6/22/2005 8:00:00",213)),COMVariant::createFromDate(str2Date("6/28/2005",213)),"A"); com_Items.ItemBar(h1,"A",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(false),"weekday(value) in (1,2)"); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(true),"weekday(value) in (1,2) or (hour(value)<8 or hour(value)>=16 )"); h2 = com_Items.AddItem("Task 1"); com_Items.AddBar(h2,"Task",COMVariant::createFromUtcDateTime(str2Datetime("6/22/2005 4:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/29/2005 12:00:00",213)),"A"); com_Items.ItemBar(h2,"A",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Items.ItemNonworkingUnits(h2,COMVariant::createFromBoolean(false),"weekday(value) in (1,2)"); com_Items.ItemNonworkingUnits(h2,COMVariant::createFromBoolean(true),"weekday(value) in (1, 2) or (hour(value)<4 or hour(value)>=12 )"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,78); } */ |
1629 |
How can I define the default bar's foreground color
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Height(15); com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Def(8/*exBarForeColor*/,COMVariant::createFromInt(16777215)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1","bar A"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K2","bar B"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K3","bar C"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1628 |
How can I print the selected items only
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Items,com_Print,com_rs; anytype rs,var_Items,var_Print; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); exg2antt1.ColumnAutoResize(false); exg2antt1.ContinueColumnScroll(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("8/4/1994",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.SelectItem(com_Items.ItemByIndex(0),true); com_Items.SelectItem(com_Items.ItemByIndex(2),true); com_Items.SelectItem(com_Items.ItemByIndex(4),true); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.Options("Print = Selection"); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
1627 |
How can I sort the columns to be displayed on the columns floating bar
|
1626 |
How can I add a vertical padding for my cells
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(-1/*exAllLines*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Padding")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); com_Column.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(6)); com_Column.Def(49/*exCellPaddingRight*/,COMVariant::createFromInt(6)); com_Column.Def(50/*exCellPaddingTop*/,COMVariant::createFromInt(6)); com_Column.Def(51/*exCellPaddingBottom*/,COMVariant::createFromInt(6)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("padding"); com_Items.AddItem("padding"); exg2antt1.EndUpdate(); } |
1625 |
Trying to fill the second columns. How can I do that
public void init() { COM com_Columns,com_Items; anytype var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Column 1"); com_Columns.Add("Column 2"); com_Columns.Add("Column 3"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("SubItem 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"SubItem 1.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"SubItem 1.3"); h = com_Items.AddItem("SubItem 2.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"SubItem 2.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"SubItem 2.3"); exg2antt1.EndUpdate(); } |
1624 |
How can I specify a different background color for item, in chart or list panels
public void init() { COM com_Items; anytype var_Items; int h,hC; ; super(); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); hC = com_Items.InsertItem(h,,"Child 1"); com_Items.ItemBackColor(hC,WinApi::RGB2int(255,0,0)); exg2antt1.Chart().ItemBackColor(hC,WinApi::RGB2int(0,255,0)); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); } |
1623 |
Is it possible to specify a status part for each bar
public void init() { COM com_Items; anytype var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,64); exg2antt1.Debug(true); var_s = "gBFLBCJwBAEHhEJAAChABL8IQAAYAQGKIaBwAKBQAGaAoDDQNgyQwAAxwdBMKgBBCLIxhEYobgmGIaRjHcQjEKoSxHEqIRpGCRoJiqLIZAJIEZRZAcaQvGSQYRASCRND"; var_s = var_s + "EOA0TDAY4jPD4aQiGIbRjjeL5YjiNo2UxTNRQCEB"; exg2antt1.VisualAppearance().Add(1,COMVariant::createFromStr(var_s)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/17/2001",213)),"B2"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K4"); com_Items.ItemBar(0,"<*>",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.ItemBar(0,"<*>",51/*exBarFrameColor*/,COMVariant::createFromInt(16777216)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1622 |
How can I change the the focus rectangle
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"C:\\Program Files\\Exontrol\\ExG2antt\\sample\\EBN\\hoverinsert.ebn"); exg2antt1.Background(19/*exShowFocusRect*/,0x1000000); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Check")); com_Column = var_Column; com_Column.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(2)); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); exg2antt1.SelForeColor(exg2antt1.ForeColor()); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.DefaultItemHeight(22); exg2antt1.ShowFocusRect(true); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); com_Items.AddItem(""); exg2antt1.EndUpdate(); } |
1621 |
Can each cell have their own dropdown lists that contain "different list item values" for each cell, not predefined for the entire column
public void init() { COM com_Editor,com_Editor1,com_Editor2,com_Editor3,com_Items; anytype var_Editor,var_Editor1,var_Editor2,var_Editor3,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("Column/Cell-Same")).Editor(); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(0,"Zero"); com_Editor.AddItem(1,"One"); com_Editor.AddItem(2,"Two"); var_Editor1 = COM::createFromVariant(exg2antt1.Columns().Add("Column/Cell-Different")).Editor(); com_Editor1 = var_Editor1; com_Editor1.EditType(1/*EditType*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(); h = com_Items.AddItem(COMVariant::createFromInt(0)); var_Editor2 = com_Items.CellEditor(h,COMVariant::createFromInt(1)); com_Editor2 = var_Editor2; com_Editor2.EditType(3/*DropDownListType*/); com_Editor2.AddItem(3,"Three"); com_Editor2.AddItem(4,"Four"); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(3)); com_Items.AddItem(); h = com_Items.AddItem(COMVariant::createFromInt(0)); var_Editor3 = com_Items.CellEditor(h,COMVariant::createFromInt(1)); com_Editor3 = var_Editor3; com_Editor3.EditType(6/*CheckListType*/); com_Editor3.AddItem(1,"Single"); com_Editor3.AddItem(2,"Double"); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(3)); exg2antt1.EndUpdate(); } |
1620 |
How can I specify just a few fonts in a FontType editor
public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.DrawGridLines(-2/*exRowLines*/); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("Fonts")).Editor(); com_Editor = var_Editor; com_Editor.EditType(10/*FontType*/); com_Editor.ClearItems(); com_Editor.AddItem(0,"Calibri"); com_Editor.AddItem(1,"Arial"); com_Editor.AddItem(2,"Rockwell"); com_Editor.AddItem(3,"Tahoma"); com_Editor.SortItems(COMVariant::createFromBoolean(true)); com_Editor.DropDownRows(4); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Tahoma"); exg2antt1.EndUpdate(); } |
1619 |
How can I show only the working-hours in chart and histogram panels
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); exg2antt1.DrawGridLines(-1/*exAllLines*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.LevelCount(3); com_Chart.NonworkingHours(16253183); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramType(1/*exHistOverAllocation*/); com_Bar.HistogramPattern(com_Bar.Pattern()); com_Chart.ShowNonworkingDates(false); com_Chart.ShowNonworkingUnits(false); com_Chart.ShowNonworkingHours(false); com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.UnitScale(65536/*exHour*/); com_Chart.UnitWidth(4); com_Chart.ResizeUnitScale(com_Chart.UnitScale()); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task A"); com_Items.AddBar(h,"Task",COMVariant::createFromUtcDateTime(str2Datetime("6/23/2005 11:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/23/2005 12:00:00",213))); com_Items.ItemBar(h,"",21/*exBarEffort*/,"0.0416666"); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Task B"); com_Items.AddBar(h,"Task",COMVariant::createFromUtcDateTime(str2Datetime("6/23/2005 12:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/23/2005 16:00:00",213))); com_Items.ItemBar(h,"",21/*exBarEffort*/,"0.0416666"); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1618 |
How do you embed HTML options into the anchor click string
// AnchorClick event - Occurs when an anchor element is clicked. void onEvent_AnchorClick(str _AnchorID,str _Options) { ; print( _AnchorID ); print( _Options ); } public void init() { COM com_Columns,com_Items; anytype var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("Car")).Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("<a mazda_1;options for 1>Mazda <b>1</b></a>"); com_Items.AddItem("<a mazda_2;options for 2>Mazda <b>2</b></a>"); com_Items.AddItem("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>"); com_Items.AddItem("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>"); exg2antt1.EndUpdate(); } |
1617 |
How do I add a checkbox column (method 2)
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; print( "CheckBox Changed:" ); print( exg2antt1.Items().CellState(_Item,_ColIndex) ); } public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); COM::createFromVariant(exg2antt1.Columns().Add("Check")).Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellState(com_Items.AddItem("Check 1"),COMVariant::createFromInt(0),0); com_Items.CellState(com_Items.AddItem("Check 2"),COMVariant::createFromInt(0),1); com_Items.CellState(com_Items.AddItem("Check 3"),COMVariant::createFromInt(0),0); com_Items.CellState(com_Items.AddItem("Check 4"),COMVariant::createFromInt(0),1); exg2antt1.EndUpdate(); } |
1616 |
How do I add a checkbox column (method 1)
// Change event - Occurs when the user changes the cell's content. void onEvent_Change(int _Item,int _ColIndex,COMVariant /*variant*/ _NewValue) { ; print( "CheckBox Changed:" ); print( _NewValue ); } public void init() { COM com_Column,com_Editor,com_Items; anytype var_Column,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Check")); com_Column = var_Column; var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(19/*CheckValueType*/); com_Editor.Option(17/*exCheckValue2*/,COMVariant::createFromInt(1)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.AddItem(COMVariant::createFromInt(1)); com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.AddItem(COMVariant::createFromInt(1)); exg2antt1.EndUpdate(); } |
1615 |
How do I change the progress bar's appearance
public void init() { COM com_Appearance,com_Editor; anytype var_Appearance,var_Editor; ; super(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); com_Appearance.Add(2,"c:\\exontrol\\images\\pushed.ebn"); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("Progress")).Editor(); com_Editor = var_Editor; com_Editor.EditType(13/*ProgressBarType*/); com_Editor.Option(11/*exProgressBarBackColor*/,COMVariant::createFromInt(16777216)); com_Editor.Option(13/*exProgressBarMarkTicker*/,COMVariant::createFromInt(33554432)); exg2antt1.Items().AddItem(COMVariant::createFromInt(33)); } |
1614 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)
public void init() { COM com_Items; anytype var_Items; str var_s; ; super(); exg2antt1.BeginUpdate(); var_s = "gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78eg"; var_s = var_s + "BHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxL"; var_s = var_s + "C8Mw3BDvYDkOAABAIgI="; exg2antt1.VisualAppearance().Add(1,COMVariant::createFromStr(var_s)); exg2antt1.SelBackColor(0x1fffffe); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); exg2antt1.SelBackColor(0x1000000); exg2antt1.ShowFocusRect(false); exg2antt1.Columns().Add("Items"); exg2antt1.DefaultItemHeight(22); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBackColor(com_Items.AddItem("red"),WinApi::RGB2int(255,0,0)); com_Items.ItemBackColor(com_Items.AddItem("blue"),WinApi::RGB2int(0,0,255)); com_Items.ItemBackColor(com_Items.AddItem("green"),WinApi::RGB2int(0,255,0)); exg2antt1.EndUpdate(); } |
1613 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.DefaultItemHeight(22); exg2antt1.ShowFocusRect(false); exg2antt1.Columns().Add("Items"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBackColor(com_Items.AddItem("red"),WinApi::RGB2int(255,0,0)); com_Items.ItemBackColor(com_Items.AddItem("blue"),WinApi::RGB2int(0,0,255)); com_Items.ItemBackColor(com_Items.AddItem("green"),WinApi::RGB2int(0,255,0)); exg2antt1.EndUpdate(); } |
1612 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.SelForeColor(exg2antt1.ForeColor()); exg2antt1.DefaultItemHeight(22); exg2antt1.ShowFocusRect(true); exg2antt1.Columns().Add("Items"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBackColor(com_Items.AddItem("red"),WinApi::RGB2int(255,0,0)); com_Items.ItemBackColor(com_Items.AddItem("blue"),WinApi::RGB2int(0,0,255)); com_Items.ItemBackColor(com_Items.AddItem("green"),WinApi::RGB2int(0,255,0)); exg2antt1.EndUpdate(); } |
1611 |
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void onEvent_BeforeExpandItem(int _Item,COMVariant /*variant*/ _Cancel) { ; print( "BeforeExpandItem" ); print( _Item ); exg2antt1.Items().InsertItem(_Item,,"new child"); } public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.FilterList(4/*exRootItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemHasChildren(com_Items.InsertItem(,,"Group 1"),true); com_Items.ItemHasChildren(com_Items.InsertItem(,,"Group 2"),true); exg2antt1.EndUpdate(); } |
1610 |
How can identify when I clicked Hour, Month, or Year of the time-scale overview
|
1609 |
How can define a minimum and maximum in a column SpinType
public void init() { COM com_Columns,com_Editor; anytype var_Columns,var_Editor; ; super(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Editor = COM::createFromVariant(com_Columns.Add("SpinType between 5 and 150")).Editor(); com_Editor = var_Editor; com_Editor.EditType(20/*SliderType*/); com_Editor.Numeric(-1/*exInteger*/); com_Editor.Option(41/*exSliderWidth*/,COMVariant::createFromInt(0)); com_Editor.Option(43/*exSliderMin*/,COMVariant::createFromInt(5)); com_Editor.Option(44/*exSliderMax*/,COMVariant::createFromInt(150)); exg2antt1.Items().AddItem(COMVariant::createFromInt(50)); } |
1608 |
How I can change the title of the time-scale overview. (Example: Month by 'Mes', Day by 'Dia')
|
1607 |
Is it possible to set a fixed wide for the Items List Arrea, so that when changing the Form.width, the Items List Arrea be constant and therefor changing the Chart Area-wide
|
1606 |
How can I clear the colors for all bars at once
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,64); exg2antt1.Debug(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A"); com_Items.ItemBar(h,"A",33/*exBarColor*/,COMVariant::createFromInt(65280)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/17/2001",213)),"B2"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K4"); com_Items.ItemBar(0,"<*>",33/*exBarColor*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1605 |
How can I change the colors for all bars at once
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,64); exg2antt1.Debug(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/17/2001",213)),"B2"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K4"); com_Items.ItemBar(0,"<*>",33/*exBarColor*/,COMVariant::createFromInt(255)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1604 |
How can I show my custom bars in the histogram (method 3)
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.AllowLinkBars(false); com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2000",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramType(256/*exHistCumulative*/); com_Bar.HistogramItems(6); com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramCumulativeOriginalColorBars(1/*exKeepOriginalColor*/); com_Bar.OverlaidType(1/*exOverlaidBarsOffset*/); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); h = com_Items.AddItem("Item 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213))); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(255)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1603 |
How can I show my custom bars in the histogram (method 2)
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(32); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(6/*exPatternBDiagonal*/); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); h = com_Items.AddItem("Item 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213))); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(255)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1602 |
How can I show my custom bars in the histogram (method 1)
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(32); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(6/*exPatternBDiagonal*/); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Copy("Task","MyBar"); com_Bar = var_Bar; com_Bar.HistogramPattern(5/*exPatternFDiagonal*/); com_Bar.Color(WinApi::RGB2int(255,0,0)); com_Bar.HistogramColor(com_Bar.Color()); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 3"),"MyBar",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1601 |
Do you have any Fit-To-Page options when printing the control
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Items,com_Print,com_rs; anytype rs,var_Items,var_Print; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ColumnAutoResize(false); exg2antt1.ContinueColumnScroll(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("8/4/1994",213))); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.Options("FitToPage = On"); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |